import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const Login = ()=> import('views/login/Login.vue')
const Home = ()=> import('views/home/Home.vue')
const regUser = ()=> import('views/register/regUser.vue')
const Profile = ()=> import('views/profile/Profile.vue')
const Category = ()=> import('views/category/Category.vue')
const Msg = ()=> import('views/msg/Msg.vue')
const Detail =()=>import('views/detail/Detail.vue')
// const Edit =()=>import('views/edit/Edit.vue')
const WriteArticles =()=>import('views/write/WriteArticles')
const bigFileUpload =()=>import('components/common/bigFileUpload.vue')
const Dematic = ()=>import('components/common/dematic.vue')
const routes = [
    {
        path: '/login',
		name: "Login",
        component: Login
    },
	{
		path: '/register',
		name: "Register",
		component: regUser
	}
	,
	{
		path: '/home',
		name: "Home",
		component: Home
	},
	{
		path: '/category',
		name: "Category",
		component: Category
	},
	{
		path: '/msg',
		name: "Msg",
		component: Msg
	},
	{
		path: '/profile',
		name: "Profile",
		component: Profile
	},
	{
		path:"", 
		redirect:"/home"
	},
	{
		path:"/detail/:artId",
		name:"Detail",
		component:Detail
	},
	{
		path:"/publish",
		name:"WriteArticles",
		component:WriteArticles
	},
	{
		path:"/edit",
		name:"WriteArticles",
		component:WriteArticles
	},
	{
		path:"/bigfile",
		name:"bigFileUpload",
		component:bigFileUpload
	},{
		path:"/dematic",
		name:"Dematic",
		component:Dematic,
		
	}
	
]

const router = new VueRouter({
    routes,
	mode:'history'
})

export default router


